<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <?php include_http_metas() ?>
    <?php include_metas() ?>
    <?php include_title() ?>
    <link rel="shortcut icon" href="/favicon.ico" />
    <?php include_stylesheets() ?>
    <?php include_javascripts() ?>
  </head>
  <body>
    <?php include_partial('global/header') ?>
    
    <?php if ($sf_user->isAuthenticated()): ?>
    	<?php if ($sf_user->hasCredential('Admin')): ?>
    		<?php include_partial('global/menu_admin') ?>
    	<?php endif; ?>
    	<?php if ($sf_user->hasCredential('Abastecimiento')): ?>
    		<?php include_partial('global/menu_abastecimiento') ?>
    	<?php endif; ?> 
    	<?php if ($sf_user->hasCredential('Internacional')): ?>
    		<?php include_partial('global/menu_internacional') ?>
    	<?php endif; ?> 
    	<?php if ($sf_user->hasCredential('Comprador')): ?>
    		<?php include_partial('global/menu_comprador') ?>
    	<?php endif; ?> 
    	<?php if ($sf_user->hasCredential('Finanzas')): ?>
    		<?php include_partial('global/menu_finanzas') ?>
    	<?php endif; ?>  
    	<?php if ($sf_user->hasCredential('Director')): ?>
    		<?php include_partial('global/menu_director') ?>
    	<?php endif; ?>  
    <?php endif; ?>
    
    <?php if (!$sf_user->isAuthenticated()): ?>
    <div class="menu">
    	<ul></ul>
    </div> 
    <?php endif; ?>
    
    <div id="contenido">
    	<?php if ($sf_user->isAuthenticated()): ?>
    		<p id="info_user"><strong>Usuario: </strong><?php echo $sf_user->getAttribute('perfil') ?> <strong> Perfil:</strong><?php echo $sf_user->getAttribute('perfil') ?> <?php echo link_to('Salir', '/admin/login/logout') ?></p>
    	<?php endif;?>
    	<div id="lista">
      		<?php echo $sf_content ?>
      	</div>
    </div>
    <?php include_partial('global/footer') ?> 
  </body>
</html>
